package com.ai.zhly.util.sms.msg;

import com.ai.zhly.util.sms.utils.Utils;

/**
 * 
 * @company：AsiaInfo BDX-DS-PSO NFJD/XZ/GD Dept.-GZ
 * @author：xw.jiang on 2015年11月13日
 * @email:jiangxw@asiainfo.com
 * @description:各类消息包的父类 也是消息头的基本格式
 */
public class MsgHead {

	private int Total_Length; // 4字节 消息的总长度(字节数)
	private int Command_Id; // 4字节 消息类型(登录消息，链路检测消息....)
	private int Sequence_Id;

	public void setSequence_Id(int sequence_Id) {
		if (sequence_Id == 0) {
			this.Sequence_Id = Utils.nextSequenceId();
		} else {
			this.Sequence_Id = sequence_Id;
		}

	}

	public int getTotal_Length() {
		return Total_Length;
	}

	public void setTotal_Length(int total_Length) {
		Total_Length = total_Length;
	}

	public int getCommand_Id() {
		return Command_Id;
	}

	public void setCommand_Id(int command_Id) {
		Command_Id = command_Id;
	}

	public int getSequence_Id() {
		return Sequence_Id;
	}

}
